Skip to content

Added unschedule possibility.#226

Merged
s3rius merged 2 commits intodevelopfrom
feature/unscheduling
Oct 18, 2023
Merged

Added unschedule possibility.#226
s3rius merged 2 commits intodevelopfrom
feature/unscheduling

Conversation

@s3rius
Copy link
Member

@s3rius s3rius commented Oct 18, 2023

This PR adds new abstraction called "CreatedSchedule". When schedule_* methods are called, the CreatedSchedule is returned. This class has methods to unschedule previously scheduled tasks.

Also, we added new method to the schedule source to remove schedules. To make this method easy to implement, we had to once again add new field schedule_id to the ScheduledTask. To make it backward compatible though, we made it with default_factory.

Signed-off-by: Pavel Kirilin <win10@list.ru>
Signed-off-by: Pavel Kirilin <win10@list.ru>
@codecov-commenter
Copy link

Codecov Report

Merging #226 (747ffe1) into develop (060dd94) will decrease coverage by 0.42%.
The diff coverage is 53.33%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

@@             Coverage Diff             @@
##           develop     #226      +/-   ##
===========================================
- Coverage    73.45%   73.04%   -0.42%     
===========================================
  Files           55       56       +1     
  Lines         1646     1684      +38     
===========================================
+ Hits          1209     1230      +21     
- Misses         437      454      +17     
Files Coverage Δ
taskiq/scheduler/scheduled_task.py 92.59% <100.00%> (+0.59%) ⬆️
taskiq/abc/schedule_source.py 84.61% <66.66%> (-6.30%) ⬇️
taskiq/decor.py 84.84% <33.33%> (+0.47%) ⬆️
taskiq/kicker.py 67.81% <27.27%> (-4.69%) ⬇️
taskiq/scheduler/created_schedule.py 61.53% <61.53%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@s3rius s3rius merged commit dd0758d into develop Oct 18, 2023
@s3rius s3rius deleted the feature/unscheduling branch October 18, 2023 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants